Skip to content

[llvm][cmake] Turn runtime in PROJECTS warnings into FATAL_ERROR #152302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

DavidSpickett
Copy link
Collaborator

@DavidSpickett DavidSpickett commented Aug 6, 2025

As promised by the current warning message:
CMake Warning at CMakeLists.txt:209 (message):
Using LLVM_ENABLE_PROJECTS=openmp is deprecated now, and will become a
fatal error in the LLVM 21 release. Please use
-DLLVM_ENABLE_RUNTIMES=openmp or see the instructions at
https://openmp.llvm.org/ for building the runtimes.

I have changed this to:
CMake Error at CMakeLists.txt:202 (message):
Using LLVM_ENABLE_PROJECTS=openmp is no longer supported. Please use
-DLLVM_ENABLE_RUNTIMES=openmp or see the instructions at
https://openmp.llvm.org/ for building the runtimes.

I removed the check for offload because offload never hits the warning, it errors earlier with:
CMake Error at CMakeLists.txt:143 (MESSAGE):
offload isn't a known project:
bolt;clang;clang-tools-extra;compiler-rt;cross-project-tests;libclc;lld;lldb;mlir;openmp;polly;flang;libc.
Did you mean to enable it as a runtime in LLVM_ENABLE_RUNTIMES?

We could remove the FATAL_ERRORs entirely but I thought leaving them in 21.x and removing them on main made more sense.

So this change is specifically for 21.x.

As promised by the current warning message:
CMake Warning at CMakeLists.txt:209 (message):
  Using LLVM_ENABLE_PROJECTS=openmp is deprecated now, and will become a
  fatal error in the LLVM 21 release.  Please use
  -DLLVM_ENABLE_RUNTIMES=openmp or see the instructions at
  https://openmp.llvm.org/ for building the runtimes.

I have changed this to:
CMake Warning at CMakeLists.txt:202 (message):
  Using LLVM_ENABLE_PROJECTS=openmp is no longer supported.  Please use
  -DLLVM_ENABLE_RUNTIMES=openmp or see the instructions at
  https://openmp.llvm.org/ for building the runtimes.

I removed the check for offload because offload never hits the warning,
it errors earlier with:
CMake Error at CMakeLists.txt:143 (MESSAGE):
  offload isn't a known project:
  bolt;clang;clang-tools-extra;compiler-rt;cross-project-tests;libclc;lld;lldb;mlir;openmp;polly;flang;libc.
  Did you mean to enable it as a runtime in LLVM_ENABLE_RUNTIMES?

We could remove the FATAL_ERRORs entirely but I thought leaving
them in 21.x and removing them on main made more sense.

So this change is specifically for 21.x.
@DavidSpickett
Copy link
Collaborator Author

The alternative is to bump 21 to 22 in the messages on the 21.x branch, and turn them into errors on main instead.

Copy link
Collaborator

@tru tru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I think we should make sure there is a release note for this as well, since I expect it to break some peoples build configurations.

@github-project-automation github-project-automation bot moved this from Needs Triage to Needs Merge in LLVM Release Status Aug 6, 2025
@jhuber6
Copy link
Contributor

jhuber6 commented Aug 6, 2025

I would really like #98897 to be discussed because we merge this. As it stands it makes builds take an unreasonably long amount of time.

@DavidSpickett
Copy link
Collaborator Author

but I think we should make sure there is a release note for this as well

Done, and updated the cmake docs page.

@jhuber6
Copy link
Contributor

jhuber6 commented Aug 6, 2025

@frasercrmck Did we get libclc fully working from the runtimes configuration?

Copy link
Contributor

@nikic nikic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is absolutely inappropriate to land on the release branch.

Feel free to update the version numbers -- or better, remove the mention of specific versions entirely. These will get removed when we are ready to remove them, not on a specific timeline.

@tru
Copy link
Collaborator

tru commented Aug 6, 2025

Oh I missed it was in the release branch, I thought it would be on the main branch right after release. Then I agree with Nikita, it shouldn't land in the release branch right before the final RC.

@tru tru moved this from Needs Merge to Needs Review in LLVM Release Status Aug 7, 2025
DavidSpickett added a commit to DavidSpickett/llvm-project that referenced this pull request Aug 7, 2025
Judging from the reaction to llvm#152302
we are not ready to make this a fatal error.

Remove the specific version number, and update the libc message to
match the others' wording.
@DavidSpickett
Copy link
Collaborator Author

Understood. #152457 removes the version number.

@DavidSpickett DavidSpickett removed this from the LLVM 21.x Release milestone Aug 7, 2025
DavidSpickett added a commit that referenced this pull request Aug 7, 2025
#152457)

Judging from the reaction to
#152302, we are not ready to
make this a fatal error.

Remove the specific version number, and update the libc message to match
the others' wording.
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Aug 7, 2025
…CTS warnings (#152457)

Judging from the reaction to
llvm/llvm-project#152302, we are not ready to
make this a fatal error.

Remove the specific version number, and update the libc message to match
the others' wording.
tru pushed a commit to llvmbot/llvm-project that referenced this pull request Aug 8, 2025
llvm#152457)

Judging from the reaction to
llvm#152302, we are not ready to
make this a fatal error.

Remove the specific version number, and update the libc message to match
the others' wording.

(cherry picked from commit 6cd6de5)
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Aug 8, 2025
…CTS warnings (#152457)

Judging from the reaction to
llvm/llvm-project#152302, we are not ready to
make this a fatal error.

Remove the specific version number, and update the libc message to match
the others' wording.

(cherry picked from commit 6cd6de5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

4 participants